package aufgabe2;

/**
 * Normal Grade
 * 
 * @author Lukas Koell
 * @author David Medenjak
 * @author Johannes Riedmann
 */
public class NormalGrade implements Grade {

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    private int grade;
    private int points;
    private int maxPoints;

    public NormalGrade(int grade) {
        if (grade < 1 || grade > 5) {
            throw new IndexOutOfBoundsException("Grade not in range.");
        }
        this.grade = grade;
        points = 0;
        maxPoints = 0;
    }

    public NormalGrade(int grade, int points, int maxPoints) {
        this.grade = grade;
        this.points = points;
        this.maxPoints = maxPoints;
    }

    @Override
    public boolean hasPassed() {
        if (grade < 5) {
            return true;
        }
        return false;
    }
    
    
}
